// 收集表单里的值 提交给修改密码的接口即可
$('.layui-form').on('submit', function (ev) {
    ev.preventDefault();
    var data = {
        oldPwd: md5($('.layui-form input[name=oldPwd]').val()),
        newPwd: md5($('.layui-form input[name=newPwd]').val())
    }
    var arr = [];
    for (var prop in data) {
        arr.push(`${prop}=${data[prop]}`);
    }
    var arg = arr.join('&');

    // 调用重置密码的接口方法
    rePassAPi(arg, function (res) {
        console.log(res);
        window.parent.sessionStorage.removeItem('token')
        window.parent.location.href = '/login.html'
    })

})